#include <iostream>
#include <sys/types.h>
#include <unistd.h>

using namespace std;
class Demo{
public:
	Demo(){
		mNum = 10;
	}
	void Print(){
		cout << "This is a demo:" << mNum << " pid:" << getpid() << endl;
		return;
	}
	void Print(int i){
		cout << "This is a demo:" << mNum <<" i:" << i << " pid:" << getpid() << endl;
		return;
	}
private:
	int mNum;
};

void Show(){
	cout << "Show" <<endl;
	return;
}

int main(){
	Show();
	Demo d;
	int i=0;
	d.Print();
	while(true){
		d.Print(i++);
		sleep(2);
	}
	return 0;
}
